﻿Public Class lienRandom
    Inherits System.Web.UI.Page

    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load

        Dim generateurNbre As New Random()
        'Generation d'un nombre [1,4[ (4 est donc exclus)
        Dim valeurAleatoire = generateurNbre.Next(1, 4)

        Dim nomAleatoire As String = ""

        Select Case valeurAleatoire
            Case 1
                nomAleatoire = "Loic"
            Case 2
                nomAleatoire = "Ayoub"
            Case 3
                nomAleatoire = "Max"
        End Select

        'Creation message bienvenue
        generateHyperLink.Text = "Bonjour " & nomAleatoire & " cliquez sur le lien"
        generateHyperLink.ForeColor = Drawing.Color.Aquamarine
        generateHyperLink.Style.Add("font-size", "24px")
        'Definition du URL Pattern
        generateHyperLink.NavigateUrl += "?nom=" & nomAleatoire


    End Sub

End Class